package com.czl.module_notice.fragment

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.czl.base.base.BaseTabFragment
import com.czl.base.base.BaseTabViewModel
import com.czl.base.config.AppConstants
import com.czl.base.databinding.FragmentBaseTabBinding
import com.czl.base.route.RouteCenter
import me.yokeyword.fragmentation.SupportFragment

@Route(path = AppConstants.Router.Notice.F_NOTICE)
class NoticeFragment : BaseTabFragment<FragmentBaseTabBinding,BaseTabViewModel>() {
    override fun initData() {
        super.initData()
        viewModel.tabData.set("未读消息, 已读消息")
        viewModel.tvTitle.set("通知详情")
    }

    override fun fragments(): List<SupportFragment> {
        return arrayListOf(
            RouteCenter.navigate(AppConstants.Router.Notice.F_NOTICE_LIST, Bundle().apply {
                putString(AppConstants.BundleKey.IS_READ_KEY,"0")
            }) as SupportFragment,

            RouteCenter.navigate(AppConstants.Router.Notice.F_NOTICE_LIST, Bundle().apply {
                putString(AppConstants.BundleKey.IS_READ_KEY,"1")
            }) as SupportFragment
        )
    }

    override fun useBaseLayout(): Boolean {
        return true
    }

}